<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>主</title>
<link rel="stylesheet" type="text/css" href="__CSS__main.css"/>
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<import type='js' file="js.main" />
<style type="text/css">
b.w{padding: 4px 8px; background-color:#28b779; color:#fff; border-radius:3px; font-weight:normal;}
b.w1{background-color:#b6b3b3;}
b.w2{background-color:#ff5454;}
b.w3{background-color:#ff5454;}
</style>
</head>

<body>  
<div class="main-frame">
	<div class="position">直播 > 直播列表</div>
	<div class="table-list">
	 <table width="100%" border="1" cellspacing="0" cellpadding="0" class="indextable">
		    <tr class="th-bg">
		      <th width="5%">ID</th>
			  <th width="5%">domainid</th>
		      <th width="16%">直播标题</th>
		      <th width="16%">直播简介</th>
		      <th width="9%">开始时间</th>
		      <th width="9%">结束时间</th>
		      <th width="9%">价格</th>
		      <th width="7%">状态</th>
			  <th width="7%">类型</th>
		      <th width="10%">操作</th>
	        </tr>
	        <volist name='list' id='data' empty="暂无数据">
		    <tr class="tr-line">
		      <td>{$data.id}</td>
			  <td>{$data.live_domain}</td>
		      <td style="text-align:left; padding-left:6px;">{$data.live_name}</td>
		      <td style="text-align:left; padding-left:6px;">{$data.live_content|strip_tags|msubstr=0,60}</td>
		      <td>{$data.live_startdate}</td>
		      <td style="font-size:12px;">{$data.live_enddate}</td>
		      <td>
				  <if condition="($data.live_pre eq 0) or ($data.live_pre eq '')">
					  钻石：{$data.live_dirll}<br>
			      <else />
					  现金：{$data.live_pre}
				  </if>
			  </td>
		      <td>{:W('Live/livestatus',array('livestarttime'=>$data['live_startdate'],'liveendtime'=>$data['live_enddate']))}</td>
			  <td>
				  <if condition="$data.live_type eq 0">录播</if>
				  <if condition="$data.live_type eq 1">直播</if>
			  </td>
		      <td>
		      	<!--<a class='preview' name="{$data.typename}" path="{:U('Home/Index/index',array('domainid'=>$data['domainid'],'rootid'=>$data['id']))}">预览</a> / -->
		      	<a href="{:U('Index/edit',array('id'=>$data['id']))}">编辑</a>
		      	<if condition="$Thinkphp.session.userinfo.type eq 1"> /
					<if condition="$data['live_status'] neq -1">
						<a class="resdel" refurl="{:U('delete',array('id'=>$data['id'],'del'=>1))}">删除</a>
					<else />
						<a class="resdel" refurl="{:U('delete',array('id'=>$data['id'],'del'=>0))}">恢复</a>
					</if>

		      	</if>
		      </td>
	        </tr>
	        </volist>
      </table>
    </div>
    <if condition="$page neq 1"><div class="page">{$page}</div></if>
</div>
<style type="text/css">
a.batchma{padding-left:12px; color:#000; font-weight:bold;}
</style>
<script type="text/javascript">
	$(function(){
		$("a.resdel").each(function(index, element) {
			var t = $(this);
			t.click(function(){
				var r=confirm("想好！确定要这么操作吗？");
				if (r==true){
					var refurl = $(this).attr('refurl');
					location.href = refurl;
				}else{
					return false;
				}
			})
		});
	})
</script>
</body>
</html>
